package com.qikux.listener;


import com.qikux.consts.AppConst;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;


@WebListener
public class SessionManageListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        UserManager manager = new UserManager();
        // 将容器 放入到 applicationContext 中
        sce.getServletContext().setAttribute(AppConst.USER_MANAGER, manager);

    }
}
